<?php

namespace App\Http\Requests;


class UserCarRequest extends BaseRequest
{

    public function rules(): array
    {
        return [
            'id' => [],
            'brand_id' => ['required'],
            'type' => ['required'],
            'plate_number' => ['required'],
            'color' => ['required'],
            'name' => ['required'],
            'phone' => ['required'],
            'is_default' => [],
        ];
    }


    public function messages(): array
    {
        return [
            'brand_id.required'=>'请选择汽车品牌!',
            'type.required'=>'请选择车辆类型!',
            'plate_number.unique'=>'此车牌号已存在!',
            'plate_number.required'=>'请输入车牌号!',
            'color.required'=>'请选择车辆颜色!',
            'name.required'=>'联系人不能为空!',
            'phone.required'=>'联系电话不能为空!'
        ];
    }

}
